import axios from 'axios';

export interface CompanyData {
  name: string;
  stack: string;
}

// 添加公司
export function addCompany(data: CompanyData) {
  return axios.post<any>('/company', data);
}

//  查询公司列表
export interface CompanyQuery {
  $limit: number;
  name?: string;
  $skip?: number;
}

export function getCompany(params: CompanyQuery) {
  return axios.get<any>('/company', { params });
}

// 根据id 删除公司

export function delCompany(id: number) {
  return axios.delete<any>(`/company/${id}`);
}
